FROM php:7.0-cli
LABEL maintainer="flwwsg <flwwsg@qq.com>"
# 设置时区
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
RUN mkdir /config && mkdir /entirety
VOLUME [ "/entirety", "/entirety/client", "/entirety/config/framework", "/entirety/database/framework"]
COPY ./php.ini /usr/local/etc/php/
COPY ./gen-db.sh .
COPY ./game-server-config.php /config/game-server-config.php
COPY ./passport-config.php /config/passport-config.php
RUN chmod +x ./gen-db.sh
# WORKDIR /entirety
# ENTRYPOINT [ "php" ]
CMD ["./gen-db.sh"]

# build:
# docker build -t myphp
# run:
# docker run -it --rm --name demo myphp